package io.renren.modules.carcustomerinfo.controller;

import io.renren.common.utils.PageData;
import io.renren.common.utils.R;
import io.renren.modules.carcustomerinfo.service.CarCustomerInfoService;
import io.renren.modules.carcustomerinfo.vo.CarCustomerInfoVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 客户预约信息表
 *
 */
@RestController
@RequestMapping("/carcustomerinfo")
public class CarCustomerInfoController {

    @Autowired
    private CarCustomerInfoService carCustomerInfoService;

    /**
     * 客户预约信息表(分页)
     */
    @ApiOperation("客户预约信息表(分页)")
    @GetMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        PageData<CarCustomerInfoVO> pageData = carCustomerInfoService.queryCustomerInfoPage(params);
        return R.ok().put("page", pageData);
    }

}
